package com.b.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
    * 商品图片表
    */
@Document(indexName = "productimage")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ProductImage {
    /**
    * 图片ID
    */
    @Id
    @Field(type = FieldType.Integer, index = true , store = true)
    private Integer id;

    /**
    * 商品ID
    */
    @Field(type = FieldType.Integer, index = true , store = true)
    private Integer productId;

    /**
    * 图片位置
    */
    @Field(type = FieldType.Text, index = true , store = true)
    private String imagePath;
}